import React, { Component } from 'react';
import PropTypes from 'prop-types';

const Link = ({active, children, onClick}) => {
    if(active) {
        return (<span>{children}</span>);
    }

    return (
        <a href="#"
            onClick={ (e) => {
                e.preventDefault();
                onClick();
            }}
        >
            {children}
        </a>
    );

};

Link.propTypes = {

};

export default Link;
